package cn.sdormitory.service;

import cn.sdormitory.common.dto.ResultMsg;
import cn.sdormitory.sys.entity.SysUser;
import cn.sdormitory.sys.vo.LoginInfoVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @创建人：zhouyang
 * @创建时间：2020/12/25 10:51
 * @version：V1.0
 */
public interface AppUserService {

    ResultMsg loginByOpenId(String loginCode, HttpServletRequest request);

    ResultMsg loginByPhone(String loginCode,String phoneCode, HttpServletRequest request);

    String doLogin(String loginName, HttpServletRequest request);

    SysUser getUserById(int id);

    boolean updatePassword(int id , String oldPassword , String newPassword);

    int getRoleCount(int id);

    int getRoleTeaCount(int id);

    LoginInfoVo getLoginInfo(String loginName);

    List<SysUser> listAllUser();

    List<SysUser> getAllClassTeacherList();

    List<SysUser> getAllCourseInstructorList();

    int resetPwd(Map<String, String> map);
    
    ResultMsg getUserInfoById(String loginId, HttpServletRequest request);
}
